package com.center.biz.impl;

import com.center.api.model.EduCourseStudyhistory;
import com.center.api.remote.RemoteEduCourseStudyhistoryService;
import com.center.biz.dao.EduCourseStudyhistoryMapper;
import org.apache.dubbo.config.annotation.Service;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduCourseStudyhistoryService.class)
public class RemoteEduCourseStudyhistoryServiceImpl implements RemoteEduCourseStudyhistoryService {

    private EduCourseStudyhistoryMapper eduCourseStudyhistoryMapper;

    @Override
    public int delete(int id) {
        return eduCourseStudyhistoryMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int saveArticle(EduCourseStudyhistory eduCourseStudyhistory) {
        return eduCourseStudyhistoryMapper.insertSelective(eduCourseStudyhistory);
    }

    @Override
    public EduCourseStudyhistory getById(int id) {
        return eduCourseStudyhistoryMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<EduCourseStudyhistory> list(EduCourseStudyhistory eduCourseStudyhistory) {
        return null;
    }

    @Override
    public int update(EduCourseStudyhistory eduCourseStudyhistory) {
        return eduCourseStudyhistoryMapper.updateByPrimaryKeySelective(eduCourseStudyhistory);
    }
}
